An object with formatting functions.

<div class="definition">
    Object
</div>

This object provides formatters for all widgets (especially in the grid). You can extend formatters with your custom formatters:

<textarea class="javascript">
	w2utils.formatters['myFormatter'] = function (val, params) {
		return 'format: ' + val;
	}
</textarea>

Below is the list of formatters that are already implemented:
<ul>
    <li><b>age</b> - age in human readable format</li>
    <li><b>currency</b> - money format</li>
    <li><b>date:date_format</b> - date, see <a class="argument" href="w2utils.settings">w2utils.settings</a></li>
    <li><b>datetime:date_format|time_format</b> - date & time, see <a class="argument" href="w2utils.settings">w2utils.settings</a></li>
    <li><b>float:XX</b> - formatted number, where XX is number digits after comma</li>
    <li><b>gmt</b> - time in GMT</li>
    <li><b>int</b> - formatted integer, see <a class="argument" href="w2utils.settings">w2utils.settings</a></li>
    <li><b>interval</b> - time interval in human readable format</li>
    <li><b>money</b> - money format, see <a class="argument" href="w2utils.settings">w2utils.settings</a></li>
    <li><b>number:XX</b>, - formatted number, where XX is number digits after comma</li>
    <li><b>password</b> - password ****</li>
    <li><b>percent</b> - formatted percent</li>
    <li><b>size</b>, - file size in human readable format</li>
    <li><b>time:time_format</b>, - time, see <a class="argument" href="w2utils.settings">w2utils.settings</a> </li>
    <li><b>timestamp</b> - timestamp, see <a class="argument" href="w2utils.settings">w2utils.settings</a></li>
    <li><b>toggle</b> - yes/no text</li>
</ul>

You can use them in grid when you define columns in the following way:
<textarea class="javascript">
let grid = new w2grid({
    name           : 'grid',
    columns: [
        { field: 'recid', text: 'ID', size: '50px' },
        { field: 'name', text: 'Name', size: '30%' },
        { field: 'email', text: 'Email', size: '40%', render: 'myformatter'},
        { field: 'sdate', text: 'Start Date', size: '120px', render:'date' },
        { field: 'sdate', text: 'End Date', size: '120px', render:'date|dd/mm/yyyy' }
    ],
});
</textarea>
Note that you can pass params after pipe (|).